package edu.cuit.canary.controller;

import edu.cuit.canary.po.User;
import edu.cuit.canary.service.UserService;
import edu.cuit.canary.vo.UserVo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {
    @Resource private UserService service;
    @GetMapping("/{id}")
    public UserVo loadUserById(@PathVariable Integer id){
        return service.findById(id);
    }
}
